using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace CashierSystem.UserManager
{
    public class User
    {
        private string account, userName;
        private ArrayList roleList;
        private ArrayList rightList;
        public User(string account, string userName)
        {
            this.account = account;
            this.userName = userName;
        }
        public string getAccount()
        {
            return account;
        }
        public string getName()
        {
            return userName;
        }
        public bool hasRight(string rightName)
        {
            return rightList.Contains(rightName);
        }
        public bool isRole(string roleName)
        {
            return roleList.Contains(roleName);
        }
        public void assignRight(ArrayList rights)
        {
            this.rightList = rights;
        }
        public void assignRole(ArrayList roles)
        {

            this.roleList = roles;
        }
    }
}
